#!/bin/bash

# chmod +x convert_video.sh
# 检查是否提供了两个参数
if [ "$#" -ne 2 ]; then
    echo "Usage: $0 input.mov output.mp4"
    exit 1
fi

# 获取输入和输出文件名
input_file="$1"
output_file="$2"

# 使用ffmpeg转换视频
ffmpeg -y -i "$input_file" "$output_file"

# 检查ffmpeg执行结果
if [ $? -eq 0 ]; then
    echo "Video conversion successful."
else
    echo "Video conversion failed. Check the logs for more information."
fi
